<%@ page import="java.util.List" %>
<%@ page import="entity.hotel_employee" %>
<%@ page import="java.util.ArrayList" %><%--
  Created by IntelliJ IDEA.
  User: a3502
  Date: 2022/4/26
  Time: 18:22
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>员工信息查询</title>
    <link rel="stylesheet" href="/hotelSystem/layui/css/layui.css"  media="all">
</head>
<body>
    <%
        List<hotel_employee> employeeList =(ArrayList)request.getAttribute("employeeList");

        if(employeeList==null){
    %>
            <h3>员工信息获取失败!!!!!</h3>
    <%
        }else {
    %>

    <table class="layui-table">
        <colgroup>
            <col width="150">
            <col width="150">
            <col width="200">
            <col>
        </colgroup>
        <thead>
        <tr>
            <th>员工编号</th>
            <th>员工姓名</th>
            <th>员工性别</th>
            <th>员工职位</th>
            <th>联系方式</th>
        </tr>
        </thead>
        <tbody>
        <%
            for(hotel_employee hotel_employee:employeeList){
        %>
        <tr>
            <th><%=hotel_employee.getEmployee_id() %></th>
            <th><%=hotel_employee.getEmployee_name() %></th>
            <th><%=hotel_employee.getEmployee_sex().equals("0")?" 女":" 男"%></th>
            <th><%=hotel_employee.getEmployee_job() %></th>
            <th><%=hotel_employee.getEmployee_tel()%></th>
        </tr>
        <%
            }
        %>
        </tbody>
    </table>
    <%
        }
    %>
    <script src="/hotelSystem/layui/layui.js" charset="utf-8"></script>
</body>
</html>
